<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<script src="/js/jquery-3.1.1.min.js" type="text/javascript"></script>
<body>
<script>
    $(function () {
        var data = {
            username: '武松',
            password: '123',
            role: {
                roleid: 11,
                roleName: "步军头领"
            }
        }

        $.post({
            url: "/test/testReqBody1.do",
            contentType: 'application/json',
            data: JSON.stringify(data),
            success: function (result) {
                console.log("result====" + result.list[1].username);
            }
        });
    })

</script>
</body>
</html>